<?php
//URL: http://localhost/ChampChooser/core/services/player/playerStatService.php?playerId=5004
require_once ("../../config/config.php");
require_once ("../../config/constants.php");
require_once ("../../db/queries.php");
require_once ("../../common/common.php");

$playerId= $_REQUEST["playerId"];
function playerQuery($playerId) {
	$strQuery = "select * from stat where playerid='" . $playerId . "'";
	return generateResultSet($strQuery);
}

makeStatsXML(playerQuery($playerId));

function makeStatsXML($result) {
	echo XML_PROLOGUE . "\n ";
	echo "<records>" . NEWLINE;
	if (!$result) {
		die("Something is Seriously wrong!!!!");
	} else {
		makePlayerStatsXML($result) ;
		
	}
	echo "\n" . "</records>";
}

?>